package org.celery.modules.order.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springblade.core.mp.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 * 订单表实体类
 *
 * @author Celery
 * @since 2022-04-04
 */
@Data
@TableName("celery_order")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Order对象", description = "订单表")
public class Order extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 租户ID
     */
    @ApiModelProperty(value = "租户ID")
    private String tenantId;
    /**
     * 关联商品
     */
    @ApiModelProperty(value = "关联商品")
    private String associatedGoods;
    /**
     * 订单编号
     */
    @ApiModelProperty(value = "订单编号")
    private String code;
    /**
     * 商品数量
     */
    @ApiModelProperty(value = "商品数量")
    private Integer goodsCount;
    /**
     * 商品总价
     */
    @ApiModelProperty(value = "商品总价")
    private BigDecimal goodsAmountTotal;
    /**
     * 物流费用
     */
    @ApiModelProperty(value = "物流费用")
    private BigDecimal logisticsFee;
    /**
     * 订单总金额
     */
    @ApiModelProperty(value = "订单总金额")
    private BigDecimal totalAmount;
    /**
     * 第三方支付流水号
     */
    @ApiModelProperty(value = "第三方支付流水号")
    private String outTradeNo;
    /**
     * 支付渠道(1 = 货到付款)
     */
    @ApiModelProperty(value = "支付渠道(1 = 货到付款)")
    private Integer payChannel;
    /**
     * 支付状态(1 = 未付款, 2 = 已付款)
     */
    @ApiModelProperty(value = "支付状态(1 = 未付款, 2 = 已付款)")
    private Integer payStatus;
    /**
     * 物流编号
     */
    @ApiModelProperty(value = "物流编号")
    private String logisticsCode;
    /**
     * 发货状态(1 = 待发货, 2 = 已发货)
     */
    @ApiModelProperty(value = "发货状态(1 = 待发货, 2 = 已发货)")
    private Integer shipStatus;
    /**
     * 运送方式(1 = 宅配, 2 = 超市-711)
     */
    @ApiModelProperty(value = "运送方式(1 = 宅配, 2 = 超市-711)")
    private Integer shipType;
    /**
     * 来源域名
     */
    @ApiModelProperty(value = "来源域名")
    private String fromDomain;
    /**
     * 来源IP
     */
    @ApiModelProperty(value = "来源IP")
    private String fromIp;
    /**
     * 来源用户(出单人id)
     */
    @ApiModelProperty(value = "来源用户(出单人id)")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long fromUser;
    /**
     * 收件人姓名
     */
    @ApiModelProperty(value = "收件人姓名")
    private String receiverName;
    /**
     * 收件人电话
     */
    @ApiModelProperty(value = "收件人电话")
    private String receiverPhone;
    /**
     * 收件人邮箱
     */
    @ApiModelProperty(value = "收件人邮箱")
    private String receiverEmail;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     * 收货地址
     */
    @ApiModelProperty(value = "收货地址")
    private String shippingAddress;
    /**
     * 地区/国家
     */
    @ApiModelProperty(value = "地区/国家(1 = 台湾)")
    private Integer area;
    /**
     * 是否新用户
     */
    @ApiModelProperty(value = "是否新用户(1 = 新用户, 2 = 老用户)")
    private Integer isNew;
    /**
     * 作废备注
     */
    @ApiModelProperty(value = "作废备注")
    private String voidRemark;


}
